import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '任务名称',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '地点',
    align:"center",
    dataIndex: 'address'
   },
   {
    title: 'delivery_date',
    align:"center",
    dataIndex: 'deliveryDate'
   },
   {
    title: 'organization_id',
    align:"center",
    dataIndex: 'organizationId'
   },
   {
    title: 'owner_id',
    align:"center",
    dataIndex: 'ownerId'
   },
   {
    title: 'infer_status',
    align:"center",
    dataIndex: 'inferStatus'
   },
   {
    title: 'last_export_report_at',
    align:"center",
    dataIndex: 'lastExportReportAt'
   },
   {
    title: 'last_review_at',
    align:"center",
    dataIndex: 'lastReviewAt'
   },
   {
    title: 'city_id',
    align:"center",
    dataIndex: 'cityId'
   },
   {
    title: 'province_id',
    align:"center",
    dataIndex: 'provinceId'
   },
   {
    title: 'infer_progress',
    align:"center",
    dataIndex: 'inferProgress'
   },
   {
    title: 'infer_finish_in_hours',
    align:"center",
    dataIndex: 'inferFinishInHours'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '任务名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '地点',
    field: 'address',
    component: 'Input',
  },
  {
    label: 'delivery_date',
    field: 'deliveryDate',
    component: 'DatePicker',
    componentProps: {
       showTime:true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: 'organization_id',
    field: 'organizationId',
    component: 'InputNumber',
  },
  {
    label: 'owner_id',
    field: 'ownerId',
    component: 'InputNumber',
  },
  {
    label: 'infer_status',
    field: 'inferStatus',
    component: 'Input',
  },
  {
    label: 'last_export_report_at',
    field: 'lastExportReportAt',
    component: 'DatePicker',
    componentProps: {
       showTime:true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: 'last_review_at',
    field: 'lastReviewAt',
    component: 'DatePicker',
    componentProps: {
       showTime:true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: 'city_id',
    field: 'cityId',
    component: 'Input',
  },
  {
    label: 'province_id',
    field: 'provinceId',
    component: 'Input',
  },
  {
    label: 'infer_progress',
    field: 'inferProgress',
    component: 'Input',
  },
  {
    label: 'infer_finish_in_hours',
    field: 'inferFinishInHours',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];
//子表单数据
//子表表格配置
export const doctorserverInspectionrecordColumns: JVxeColumn[] = [
    {
      title: 'notes',
      key: 'notes',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'road_segment_id',
      key: 'roadSegmentId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'belong_to_task_id',
      key: 'belongToTaskId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'inspection_end_point',
      key: 'inspectionEndPoint',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'inspection_start_point',
      key: 'inspectionStartPoint',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'inspection_end_time',
      key: 'inspectionEndTime',
      type: JVxeTypes.datetime,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'inspection_start_time',
      key: 'inspectionStartTime',
      type: JVxeTypes.datetime,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'inspection_date',
      key: 'inspectionDate',
      type: JVxeTypes.date,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'speed',
      key: 'speed',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
  ]
export const doctorserverRoadimageColumns: JVxeColumn[] = [
    {
      title: '纬度',
      key: 'latitude',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '经度',
      key: 'longitude',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '图片路径',
      key: 'image',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'checker_id',
      key: 'checkerId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'is_checked',
      key: 'isChecked',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'is_reviewed',
      key: 'isReviewed',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'record_id',
      key: 'recordId',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'is_flag',
      key: 'isFlag',
      type: JVxeTypes.inputNumber,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: 'infer_status',
      key: 'inferStatus',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '任务单id',
      key: 'taskId',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
  ]
